<?php
declare (strict_types = 1);

namespace app\admin\validate\maichen;

use think\Validate;

class Customer extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
        'product_name' => ['require'],
        'physical_pic' => ['require'],
        'specifications_pic' => ['require'],
        'attribute' => ['require'],
        'quotation_pic' => ['require'],
        'purchasing_cost' => ['require'],
        'consumables' => ['require'],
        'artificial' => ['require'],
        'cargo_damage' => ['require'],
    ];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [
        'product_name.require' => '商品名称是必填项',
        'physical_pic.require' => '实物图是必填项',
        'specifications_pic.require' => '商品规格图是必填项',
        'attribute.require' => '属性是必填项',
        'quotation_pic.require' => '报价截图是必填项',
        'purchasing_cost.require' => '拿货成本是必填项',
        'consumables.require' => '耗材是必填项',
        'artificial.require' => '人工是必填项',
        'cargo_damage.require' => '货损是必填项',
    ];
}
